fix(customElement): handle hyphenated prop pass to custom element#12032
Closed
linzhe141 wants to merge 6 commits intovuejs:mainfrom
Closed
fix(customElement): handle hyphenated prop pass to custom element#12032linzhe141 wants to merge 6 commits intovuejs:mainfrom
linzhe141 wants to merge 6 commits intovuejs:mainfrom
Conversation
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/reactivity
@vue/runtime-core
@vue/compiler-ssr
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
edison1105
reviewed
Sep 26, 2024
|
|
||
| if (key in el) { | ||
| // if el is a Vue custom element, it should be passed as a prop. | ||
| if (camelize(key) in el) { |
Member
There was a problem hiding this comment.
this change is unnecessary. see line 142
edison1105
reviewed
Sep 26, 2024
| // eg. <select :type="null"></select> <select :willValidate="null"></select> | ||
| try { | ||
| el[key] = value | ||
| el[camelize(key)] = value |
Member
There was a problem hiding this comment.
this is the proper change. because the normalized prop key is always camelized
yyx990803
reviewed
Sep 27, 2024
| // eg. <select :type="null"></select> <select :willValidate="null"></select> | ||
| try { | ||
| el[key] = value | ||
| el[camelize(key)] = value |
Member
There was a problem hiding this comment.
Shouldn't do it here as it affects all elements. This should only apply to Vue custom elements. See ea3efa0 (reused test from this PR)
abdullah-wn
pushed a commit
to Lazy-work/vue
that referenced
this pull request
Jan 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
close #12030